Optimal. Leaf size=42 \[ \frac{A \sin (c+d x) \cos (c+d x)}{2 d}+\frac{1}{2} x (A+2 C)+\frac{B \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0592603, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {4047, 2637, 4045, 8} \[ \frac{A \sin (c+d x) \cos (c+d x)}{2 d}+\frac{1}{2} x (A+2 C)+\frac{B \sin (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4047
Rule 2637
Rule 4045
Rule 8
Rubi steps
\begin{align*} \int \cos ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=B \int \cos (c+d x) \, dx+\int \cos ^2(c+d x) \left (A+C \sec ^2(c+d x)\right ) \, dx\\ &=\frac{B \sin (c+d x)}{d}+\frac{A \cos (c+d x) \sin (c+d x)}{2 d}+\frac{1}{2} (A+2 C) \int 1 \, dx\\ &=\frac{1}{2} (A+2 C) x+\frac{B \sin (c+d x)}{d}+\frac{A \cos (c+d x) \sin (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0543058, size = 55, normalized size = 1.31 \[ \frac{A (c+d x)}{2 d}+\frac{A \sin (2 (c+d x))}{4 d}+\frac{B \sin (c) \cos (d x)}{d}+\frac{B \cos (c) \sin (d x)}{d}+C x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.047, size = 45, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ( A \left ({\frac{\cos \left ( dx+c \right ) \sin \left ( dx+c \right ) }{2}}+{\frac{dx}{2}}+{\frac{c}{2}} \right ) +B\sin \left ( dx+c \right ) +C \left ( dx+c \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.92903, size = 57, normalized size = 1.36 \begin{align*} \frac{{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A + 4 \,{\left (d x + c\right )} C + 4 \, B \sin \left (d x + c\right )}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.477398, size = 82, normalized size = 1.95 \begin{align*} \frac{{\left (A + 2 \, C\right )} d x +{\left (A \cos \left (d x + c\right ) + 2 \, B\right )} \sin \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (A + B \sec{\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.15828, size = 116, normalized size = 2.76 \begin{align*} \frac{{\left (d x + c\right )}{\left (A + 2 \, C\right )} - \frac{2 \,{\left (A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 2 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 2 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]